package com.yllt4cloud.common.core.constant.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import com.yllt4cloud.common.core.constant.ErrorCode;

/**
 * @description: 错误码枚举类
 * @author: yaoxj
 * @create: 2019-09-11 16:23
 **/
public enum ErrorCodeEnum implements ValueEnum<Integer> {


    NOT_BIND_CLERK(9031,"账号权限不足，无法登录"),
    DATA_STATUS_ERROR(9024,"账号已被禁用，无法登录"),
    USERNAME_OR_PASSWORD_ERROR(9007,"密码错误，请重新输入"),
    NOT_HAVE_CLERK(9032,"账号对应绑定员工不存在"),
    DATA_DOESNOT_EXIST(ErrorCode.DATA_DOESNOT_EXIST,"该账号不存在，请重新输入");

    private final Integer value;
    private final String name;

    ErrorCodeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    @JsonValue
    @Override
    public Integer value() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }


}
